//
//  RoomChatCell.h
//  MooreDoll
//
//  Created by Joe on 2014/12/10.
//  Copyright (c) 2014年 Tank. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
#import "ChatRoom.h"
#import "ChatMessage.h"
#import "Roster.h"
//#import "Chat.h"

@class RoomChatCell;
@protocol RoomChatCellDelegate <NSObject>

-(void)cellsMusicPlayWithCell:(RoomChatCell *)cell;

@end


@interface RoomChatCell : UITableViewCell
{
    IBOutlet UIProgressView *PV_Progress;
}


//@property(nonatomic,strong)Chat *chat;
@property(nonatomic,strong)IBOutlet UIImageView *IV_UserPic;
@property(nonatomic,strong)IBOutlet UILabel     *LB_name;
@property(nonatomic,strong)IBOutlet UILabel     *LB_message;
@property(nonatomic,strong)IBOutlet UILabel     *LB_update;
@property(nonatomic,strong)IBOutlet UIButton    *BT_music;
@property(nonatomic,strong) NSString *sid;

@property(nonatomic,strong) ChatMessage *chatMessage;
@property(nonatomic,strong) AVAudioPlayer *myplayer;
@property(nonatomic,assign)BOOL isCellPlay;
@property(nonatomic,weak) id<RoomChatCellDelegate>delegate;

//-(void)settingChat:(Chat *)chatData;
-(void)playMusic;
-(void)stopMusic;
-(void)cellSettingWithChatMessage:(ChatMessage *)message andImageArray:(NSMutableArray *)images;
-(IBAction)musicButtonPress:(UIButton *)sender;

-(void)progressValueChange:(NSDictionary *)progressDic;

@end
